package com.platform.module.dao.config.db;

public class DynamicDataSourceHolder {
    private static final ThreadLocal<String> THREAD_LOCAL = new ThreadLocal<>();

    public static void setDataSource(String dataSource) {
        THREAD_LOCAL.set(dataSource);
    }

    public static String getDataSource() {
        return THREAD_LOCAL.get();
    }

    public static void clear() {
        THREAD_LOCAL.remove();
    }
}
